/**
 * 删除项目成员
 */
 import query from '../../untils/mysql';
 import * as uuid from 'uuid';
 import { Tip } from '../../untils/untils';
 import { check, validationResult } from 'express-validator';
 
 const validator = [
     check('id').notEmpty().withMessage("人员id不能为空！"),
 ]
 const POST = async (req: any, res: any, next: any) => {
     try {
         const { id } = req.body;
         var errors = validationResult(req);
         if (!errors.isEmpty()) {
             return Tip.tipError(res, errors.array()[0].msg);
         }
         const projectID = uuid.v1();
         await query(`delete from project_pople where id = '${id}'`);
         return Tip.tipSuccess(res, '删除成功')
     } catch (error: any) {
         Tip.tipError500(res, error)
     }
 }
 
 export {
     POST,
     validator
 }